<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * @category   design_default
 * @package    Phoenix_Worldpay
 * @copyright  Copyright (c) 2008 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
 */
?>
<b><?php echo Mage::helper('worldpay')->__('You will be redirected to Worldpay in a few seconds.'); ?></b>
<form name="worldpay_checkout" id="worldpay_checkout" action="<?php echo $this->getFormAction();?>" method="POST">
<?php if (is_array($this->getFormData())): ?>
    <?php foreach ($this->getFormData() as $name => $value): ?>
        <input type="hidden" name="<?php echo $name; ?>" <?php if (!is_null($value)) { echo 'value="'. $value . '"'; } ?> />
    <?php endforeach; ?>
<?php endif; ?>
</form>

<script type="text/javascript">
//<![CDATA[
    var paymentform = document.getElementById('worldpay_checkout');
    window.onload = paymentform.submit();
//]]>
</script>